// eslint-disable-next-line no-unused-vars
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "@/views/Login";

import Layout from "@/views/Layout";
import Home from "@/components/Home";
import User from "@/components/User";
import Dormitory from "@/components/Dormitory";
import MusicNews from "@/components/MusicNews"
import Message from "@/components/Message"
import Settings from "@/components/Settings"
import MonitorSettings from "@/components/MonitorSettings"

Vue.use(VueRouter)
const routes = [

    {
        path: '/Layout',
        name: 'Layout',
        component: Layout,
        redirect: '/Home',
        children: [
            {
                path: '/Home',
                name: 'Home',
                component: Home,
            },
            {
                path: '/User',
                name: 'User',
                component: User,
            },
            {
                path: '/Dormitory',
                name: 'Dormitory',
                component: Dormitory,
            },
            {
                path: '/MusicNews', 
                name: 'MusicNews',
                component: MusicNews
            },
            {
                path: '/Message',
                name: 'Message',
                component: Message
            },
            {
                path: '/Settings',
                name: 'Settings',
                component: Settings
            },
            {
                path: '/MonitorSettings',
                name: 'MonitorSettings', 
                component: MonitorSettings
            }
        ]
    },
    {
        path: '/',
        name: 'Login',
        component: Login,


    },

]

const router = new VueRouter({
    // mode: 'history',
    routes
})

export default router
